<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
<table border="1">
  <caption>优秀汽车</caption>
  <tr>
    <td>编号</td>
    <td>名字</td>
    <td>价格</td>
    <td>类型</td>
  </tr>
  <!--car代表数组中的每一个对象, i代表遍历的下标
  v-for="(变量名,i) in 数组名-->
  <tr v-for="(car,i) in arr">
    <td>{{i+1}}</td>
    <td>{{car.name}}</td>
    <td>{{car.price}}</td>
    <td>{{car.type}}</td>
  </tr>
</table>
  <!--不写i的for循环遍历数组-->
  <h1 v-for="car in arr">{{car.name}}---{{car.type}}</h1>
</div>
<script src="../js/vue.js"></script>
<script>
  let v =new Vue({
    el:"div",
    data:{
      arr:[{name:"比亚迪",price:25000,type:"轿车"},
        {name:"奔驰",price:55000,type:"轿车"},
           {name:"宝马",price:35000,type:"轿车"},
        {name:"大G",price:25000,type:"suv"},]
    },
    matches:{

    }
  })
</script>
</body>
</html>